Function declaration/definition

SYNOPSIS

pi_id | pi_function(pi_data *);

PARAMETER

pi_data.from: | start function name (including class name if member function)
pi_data.to: | end function name
pi_data.from2: | start function implementation if inline
pi_data.to2: | end function implementation in inline
pi_data.name: | function name (exclusive class name)
pi_data.flags: | {PI_DECLARATION | PI_DEFINITION},
(PI_PUBLIC | PI_PROTECTED | PI_PRIVATE), PI_STATIC, PI_INLINE, PI_VIRTUAL, PI_CONST, PI_TEMPLATE, PI_FRIEND, PI_ABSTRACT |
pi_data.type: | return type
pi_data.classname: | class name if member function (required only if PI_DEFINITION is set)
pi_data.nameSpace: | full scope of class e.g., X.Y.Z
pi_data.related: | pi_id of class including the function as member Default: previous class not terminated or global scope if no non-terminated class found

DESCRIPTION
This function must be called whenever the parser detects a function declaration/definition in the source file. The declared function is a member function if the function pi_function() is called inside a class declaration (between pi_start_class() and pi_end_class() ) and PI_DECLARATION is set. If PI_DEFINITION is set, pi_data.classname specifies the container class. If pi_data.classname is not set and PI_DEFINITION is set, a global function definition is assumed.
C/C++ example
Example 1
int bar( int ) { ... }
SNiFF+ Fuzzy Parser action

pi_data.from: | points to start of " bar "
pi_data.to: | points to end of " bar "
pi_data.from2: | points to the opening brace (following " bar ")
pi_data.to2: | points to the closing brace
pi_data.name: | " bar "
pi_data.flags: | PI_DEFINITION
pi_data.type: | int
pi_data.classname: | NULL ; //default value

SNiFF+ usage
highlighted in Source Editor, listed in the Symbol Browser

Example 2

class bar
{ ...
get()
}
SNiFF+ Fuzzy Parser action

pi_data.from: | points to start of " get "
pi_data.to: | points to end of " get "
pi_data.name: | " get "
pi_data.flags: | PI_DECLARATION
pi_data.classname: | NULL ; //default value

SNiFF+ usage
highlighted in Source Editor, listed in the Symbol and Class Browsers

| Note
| The pi_function call must be made between pi_start_class and pi_end_class of " bar "

Example 3:

bar::get()
{
...
}
SNiFF+ Fuzzy Parser action

pi_data.from: | points to start of " get "
pi_data.to: | points to end of " get "
pi_data.name: | " get "
pi_data.flags: | PI_DEFINITION
pi_data.classname: | " bar "

SNiFF+ usage
highlighted in Source Editor, listed in the Symbol and Class Browsers